#pragma once

#include <cstdint>
#include <vector>

namespace kanon
{
    // abstraction of vertex buffer and index buffer

    enum class BufferElementType
    {
        TYPE_FLOAT,
        TYPE_FLOAT2,
        TYPE_FLOAT3,
        TYPE_FLOAT4,
    };

    uint32_t GetSize(BufferElementType type);

    struct BufferElement
    {
        BufferElementType type;
        uint32_t index;
        uint32_t offset;
    };

    struct VertexBufferLayout
    {
        std::vector<BufferElement> elements;
    public:
        void addElement();
    };

    template<typename VertexType>
    struct VertexBuffer
    {
        VertexType* data;
        uint32_t count;
    public:
        VertexBuffer();
    };

    template<typename T>
    struct IndexBuffer
    {
        T* indices;
        uint32_t count;
    public:
        IndexBuffer();
    };
}
